package algorithm.poj.p1000;

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class P1014 {

	public static void main(String[] args) throws Exception {

		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

        String line;
        int n = 0;
        String[] ps;
        String s = "";

        line = stdin.readLine().trim();
        while (!"0 0 0 0 0 0".equals(line)) {
        	n ++;
        	ps = line.split("\\s+");
        	int[] x = new int[ps.length];
        	for (int i = 0; i < ps.length; i ++) {
        		x[i] = Integer.valueOf(ps[i]);
        	}
            s += dividing(n, x) + "\n";
            line = stdin.readLine().trim();
        }
		
		System.out.println(s);

//		long s = System.currentTimeMillis();
		
//		int count = 0;
//		int[] x = new int[] {0,0,0,0,0,0};
//		int[] y = new int[] {20,20,20,20,20,20};
//		for (int i0 = x[0]; i0 < y[0]; i0 ++) {
//			for (int i1 = x[1]; i1 < y[1]; i1 ++) {
//				for (int i2 = x[2]; i2 < y[2]; i2 ++) {
//					for (int i3 = x[3]; i3 < y[3]; i3 ++) {
//						for (int i4 = x[4]; i4 < y[4]; i4 ++) {
//							for (int i5 = x[5]; i5 < y[5]; i5 ++) {
//								int[] tmp = new int[] {i0, i1, i2, i3, i4, i5};
//								if (check(tmp) == null) {
//									if (!d(tmp)) {
//										count ++;
//										System.out.println(string(tmp));
//									}
//								}
//							}
//						}
//					}
//				}
//			}
//		}
//		System.out.println(count);
//		
//		d(new int[] {4, 4, 10000, 10000, 10000, 5000});
//		
//		System.out.println("Time: " + (System.currentTimeMillis()-s) + " ms");
	}

	private static String dividing(int n, int[] x) {

		boolean ok = false;
		Boolean c = check(x);  
		if (c == null) {
			ok = d(x);
		} else {
			ok = c;
		}
		if (ok) {
			return "Collection #"+n+":"+"\n"+"Can be divided.\n";
		} else {
			return "Collection #"+n+":"+"\n"+"Can't be divided.\n";
		}
	}
	
//	private static String string(int[] x) {
//
//		String str = "(";
//		for (int i = 0; i < x.length; i ++) {
//			if (i == x.length-1) {
//				str += x[i];
//			} else {
//				str += x[i] + ",";
//			}
//		}
//		str += ")";
//		return str;
//	}
	
	private static int sum(int[] x) {
		
		int sum = 0;
		for (int i = 0; i < x.length; i ++) {
			sum += x[i]*(i+1);
		}
		return sum;
	}
	
	private static int gcd(int a, int b) {

		if (a < 0) {
			a = -a;
		}
		if (b < 0) {
			b = -b;
		}
		
		if (a == 0) {
			return b;
		}
		if (b == 0) {
			return a;
		}
		if (a > b) {
			return gcd(a-b, b);
		} else if (a < b) {
			return gcd(b-a, a);
		} else {
			return a;
		}
	}
	
	private static int gcd(int[] x) {
		
		int g = 0;
		for (int i = 0; i < x.length; i ++) {
			if (x[i] != 0) {
				g = gcd(g, i+1);
			}
		}
		return g;
	}
	
	private static Boolean check(int[] x) {
		
		int g = gcd(x);
		if (g == 0) {
			return true;		// can be devided
		} else {
			int tmp = sum(x)/g;
			if (tmp%2 != 0) {
				return false;	//can not be divided
			} else {
				for (int i = 5; i > -1; i --) {
					if (x[i] != 0) {
						if (x[0] >= i+1) {
							return true;	//can be divided
						} else {
							break;
						}
					}
				}
				if (x[1] >= 5) {
					return true;	//can be divided
				}
				if (g >= 2) {
					int[] t = new int[6];
					for (int i = 0;i < 6; i ++) {
						t[i] = 0;
					}
					for (int i = 0;i < 6; i ++) {
						if ((i+1)%g == 0) {
							t[(i+1)/g-1] = x[i];
						}
					}

					return check(t);
				}
				
				return null;	//don't know
			}
		}
	}
	
	private static boolean d(int[] x) {
		
		int sum = sum(x);
		int half = sum/2;
		for (int i0 = 0; i0 <= x[0]; i0 ++) {
			for (int i1 = 0; i1 <= x[1]; i1 ++) {
				for (int i2 = 0; i2 <= x[2]; i2 ++) {
					for (int i3 = 0; i3 <= x[3]; i3 ++) {
						for (int i4 = 0; i4 <= x[4]; i4 ++) {
							for (int i5 = 0; i5 <= x[5]; i5 ++) {
								int[] i = new int[] {i0, i1, i2, i3, i4, i5};
								if (sum(i) == half) {
									return true;
								}
							}
						}
					}
				}
			}
		}
		return false;
	}
}
